<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新华投票系统v1.0</title>
</head>
<body>
<?php

if(!isset($_COOKIE['islogin']) || $_COOKIE['islogin']!=1){
echo "<script>window.navigate('login.php');</script>";
}

if(isset($_GET['action'])){
    require('config.php');
        $vsID = $_GET['action'];
        $update_query = "update vote_subject set state='已结束' where vsID=$vsID";
        $result_update= mysql_query($update_query) or die(mysql_error());
    if($result_update>0){
        echo "<script>alert('手动停止投票成功！您可以在已结束投票栏查看投票结果。');window.navigate('manager-vote.php');</script>";
    }

    }

?>
</body>
</html>